{include file='common/head'}
<body>
<div class="x-body">
    <form class="layui-form" action="">
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">内容</label>
            <div class="layui-input-block" style="width: 600px;">
              <textarea id="contents" name="content" >{$zixun.content}</textarea>
                <!--<textarea name="desc" placeholder="请输入内容" class="layui-textarea" rows="25" >{$zixun.content}</textarea>-->
            </div>
        </div>

    </form>
</div>
<div class="x-body">
    <form class="layui-form" action="">
        <div class="layui-form-item layui-form-text">
            <div class="layui-input-block" style="width: 600px;">
                浏览的人：{$zixun.uname}
            </div>
        </div>

    </form>
</div>
<div class="x-body">

</div>
</body>

<script src="__STATIC__/kindeditor/kindeditor-all.js"></script> 
<script charset="utf-8" src="__STATIC__/kindeditor/lang/zh-CN.js"></script>
<script type="text/javascript">
 
KindEditor.ready(function(K) {

     //textarea 
      editor = K.create('#contents', { 
        //themeType: 'simple',
        resizeType : 1,  
        allowImageRemote : true,  
        width : '300px',  
        height : '400px',  
        uploadJson: '__STATIC__/kindeditor/php/upload_json.php',
        fileManagerJson: '__STATIC__/kindeditor/php/file_manager_json.php',
        //items : ['source','bold','italic','underline','forecolor','image'],  
      
        afterCreate: function(){this.sync();},  //此行可不写，不影响获取textarea的值
        afterBlur : function(){this.sync();}//需要添加的  
    });  

 
      //封面图实时上传
    K('#image').click(function() {
            editor.loadPlugin('image', function() {
                    editor.plugin.imageDialog({
                            imageUrl : K('#url').val(),
                            clickFn : function(url, title, width, height, border, align) {
                                    K('#url').val(url);
                                    K("#image_show").html('![]('+url+')');
                                    editor.hideDialog();
                            }
                    });
            });
    });
    
 
 
});
</script>
</html>